﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CaltechSoft.Service.EntityFW.Entity
{
    public class CertificateDetails
    {
        [Key]
        public int CertificateDetailsId { get; set; }

        public int CertificateId { get; set; }
        public int CertificateStandardId { get; set; }

        public virtual Certificate Certificate { get; set; }
        public virtual CertificateStandard CertificateStandard { get; set; }
    }

    public class CertificateDetailsMap : EntityTypeConfiguration<CertificateDetails>
    {
        public CertificateDetailsMap()
        {
            this.HasKey(t => t.CertificateDetailsId);
            this.Property(t => t.CertificateDetailsId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.ToTable("CertificateDetails");
        }
    }
}
